from base.base_page import BasePage


class SearchPage(BasePage):
    def search_edit(self):
        return self.by_xpath('/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.EditText')

    def search(self):
        self.search_edit().send_keys('汉王')
